<form class="layui-form layui-box modal-form-box" action="{:request()->url()}" data-auto="true" method="post">

    <div class="layui-form-item">
        <label class="layui-form-label">姓名</label>
        <div class="layui-input-block">
            <input type="text" autofocus name="name" required="required" value='{$vo.name|default=""}' title="请输入姓名" placeholder="请输入姓名"
                   class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">手机</label>
        <div class="layui-input-block">
            <input type="tel" maxlength="11" autofocus name="mobile" required="required" value='{$vo.mobile|default=""}' pattern="^1[3-9][0-9]{9}$"
                   title="请输入手机" placeholder="请输入手机" class="layui-input">
        </div>
    </div>

    {if $cate_id}
    <div class="layui-form-item">
        <label class="layui-form-label">所在赛区</label>
        <div class='layui-input-block'>
            <select required class="layui-select full-width" name="cate_id" lay-ignore="">
                <option selected value="{$cate_id}">
                    {if $cate_id=='1'}华东
                    {elseif $cate_id=='2'}华南
                    {elseif $cate_id=='3'}西南
                    {elseif $cate_id=='4'}华北
                    {elseif $cate_id=='5'}华中
                    {elseif $cate_id=='30'}会员制商超
                    {/if}
                </option>
            </select>
        </div>
    </div>

    {else}

    <!--{if !empty($cates)}-->
    <div class="layui-form-item">
        <label class="layui-form-label">所在赛区</label>
        <div class='layui-input-block'>
            <select required class="layui-select full-width" name="cate_id" lay-ignore="">
                {foreach $cates as $cate}
                <!--{if isset($vo.cate_id) and $cate.cate_id eq $vo.cate_id}-->
                <option selected value="{$cate.cate_id}">{$cate.name}</option>
                <!--{else}-->
                <option value="{$cate.cate_id}">{$cate.name}</option>
                <!--{/if}-->
                {/foreach}
            </select>
        </div>
    </div>
    <!--{/if}-->

    {/if}

    <div class="layui-form-item">
        <label class="layui-form-label">经销商</label>
        <div class="layui-input-block">
            <input type="text" autofocus name="jxs" value='{$vo.jxs|default=""}' title="请输入经销商" placeholder="请输入经销商"
                   class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">商超系统</label>
        <div class="layui-input-block">
            <input type="text" autofocus name="supermarket" value='{$vo.supermarket|default=""}' title="请输入商超系统" placeholder="请输入商超系统"
                   class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">门店名称</label>
        <div class="layui-input-block">
            <input type="text" autofocus name="shop" value='{$vo.shop|default=""}' title="请输入门店名称" placeholder="请输入门店名称"
                   class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">门店地址</label>
        <div class="layui-input-block">
            <input type="text" autofocus name="address" value='{$vo.address|default=""}' title="请输入门店地址" placeholder="请输入门店地址"
                   class="layui-input">
        </div>
    </div>


    <div class="hr-line-dashed"></div>

    <div class="layui-form-item text-center">
        {if isset($vo['sales_id'])}<input type='hidden' value='{$vo.sales_id}' name='id'>{/if}
        <button class="layui-btn" type='submit'>提交</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消吗？" data-close>取消</button>
    </div>
</form>